//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

public class MyTank extends Tank {
    private int speed;

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    private int state;
    private int direction;

    Bullet bullet = null;

    public MyTank(int x, int y) {
        super(x, y);
        this.setType(1);
        this.setState(0);
        this.setSpeed(10);
        this.setLife(true);
    }
    public int getSpeed() {
        return this.speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getDirection() {
        return this.direction;
    }

    public void setDirection(int direction) {
        this.direction = direction;
    }

    public void skill(){
            Bullet bullet = new Bullet(this.getX() + 44, this.getY() + 70, this.getDirection());

            switch(this.getDirection()){
                case 0:
                    bulletvector.add(bullet);
                    break;
                case 1:
                    bullet = new Bullet(this.getX() + 44, this.getY() -20, this.getDirection());
                    bulletvector.add(bullet);
                    break;
                case 2:
                    bullet = new Bullet(this.getX() + 70, this.getY() + 44, this.getDirection());
                    bulletvector.add(bullet);
                    break;
                case 3:
                    bullet = new Bullet(this.getX() - 26, this.getY() + 44, this.getDirection());
                    bulletvector.add(bullet);
                    break;

            }
            Thread thread = new Thread(bullet);
            thread.start();
    }
}
